<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      lang="zh-cn">
<head>
    <meta content="云之讯,云通讯,云通讯平台" name="keywords"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
    <title>短信云平台运营系统 - 重新登录</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <link th:href="@{/resources/css/bootstrap.min14ed.css?v=3.3.6}" rel="stylesheet">
    <link th:href="@{/resources/css/font-awesome.min93e3.css?v=4.4.0}" rel="stylesheet">

    <link th:href="@{/resources/css/animate.min.css}" rel="stylesheet">
    <link th:href="@{/resources/css/style.min862f.css?v=4.1.0}" rel="stylesheet">

    <style>

        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>
</head>

<body class="gray-bg"><div th:replace="stat :: statCode"></div>
    <div style="float: right;margin-top: -10px;margin-right: 15px;cursor: pointer">
        <p style="font-size:50px;" onclick="refreshPage()">&times;</p>
    </div>
	<div class="middle-box text-center lockscreen animated fadeInDown">
		<div>
				<form id="login-form" onkeydown="if(event.keyCode==13){return false;}">
					<h4 class="no-margins">长时间未操作</h4>
					<p class="m-t-md">您需要再次输入用户名和密码</p>
                    <input type="text" class="form-control uname" placeholder="用户名" id="usernamexxx" required="">
                    <input type="password" class="form-control pword m-b" placeholder="密码" id="passwordxxx" required="">
					<label id="login-error" class="error"></label>
					<!--<a href="#">忘记密码了？</a>-->
					<button type="button" onclick="login(this)" id="btn-login" class="btn btn-primary block full-width m-b">登 录</button>
				</form>
		</div>
	<!--</div>-->
</div>
<script th:src="@{/resources/js/hex_ha_ha_ha_ha_ha.js}"></script>
<script th:src="@{/resources/js/jquery.min.js?v=2.1.4}"></script>
<script th:src="@{/resources/js/plugins/peity/jquery.peity.min.js}"></script>
<script th:src="@{/resources/js/jquery.form.js?v=1.0.0}"></script>
<script th:inline="javascript">

/*<![CDATA[*/

function login(btn){
    var username = $.trim($("#usernamexxx").val());
    var password = $.trim($("#passwordxxx   ").val());
    $("#login-error").text("");
    var options = {
        beforeSubmit : function() {
            $(btn).attr("disabled", true);
        },
        data:{
            password:hex_ha_ha_ha_ha_ha(password),
            username:username
        },
        success : function(data) {
            $(btn).attr("disabled", false);

            if(data == null){
                $("#login-error").text("请求超时");
                return;
            }

            if(data.success==true){ // 登录成功
                parent.layer.closeAll();
                return;
            }else if(data.success==false){
                $("#login-error").text(data.msg);
                return;
            }

        },
        complete : function(XMLHttpRequest,status){


        },
        url : /*[[@{/login}]]*/"/login",
        type : "post",
        timeout:30000
    };
    $("#login-form").ajaxSubmit(options);
}

function refreshPage() {
    parent.location.reload();
}




function keyUp(e) {
    var currKey=0,e=e||event;
    currKey=e.keyCode||e.which||e.charCode;
    var keyName = String.fromCharCode(currKey);
    if (currKey == 13){
        $("#btn-login").click();
    }
}
document.onkeydown = keyUp;
    /*]]>*/
</script>
</body>


</html>
